package com.bole.dao;


import com.bole.pojo.TbCarSeriesDo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
public interface CarSeriesDao extends JpaRepository<TbCarSeriesDo, Long> {

    @Modifying
    @Query("delete  from TbCarSeriesDo c  where  c.id in (:idss) ")
    void deleteBatch(List<Long> idss);

    List<TbCarSeriesDo> findAllByBrandId(Long brandId);
}
